package com.example.leetcode.tree;

import com.example.leetcode.tree.common.TreeNode;
import com.example.leetcode.tree.common.TreeUtils;

import java.util.Arrays;
import java.util.List;

/**
 * AC
 */
class Solution1469 {
    public List<Integer> getLonelyNodes(TreeNode root) {
        return TreeUtils.getLonelyNodes(root);
    }
}

public class leetcode1469 {

    public static void main(String[] args) {

        Integer[] arrP = {7, 1, 4, 6, null, 5, 3, null, null, null, null, null, 2};
//        Integer[] arrP = {1};
//        Integer[] arrP = {};
        List<Integer> nodeListP = Arrays.asList(arrP);
        TreeNode root = TreeUtils.generateAtreeByBFSList(nodeListP);

        Solution1469 solution1469 = new Solution1469();

        System.out.println("题目结果=====================");
        System.out.println(solution1469.getLonelyNodes(root));

    }
}
